#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdbool.h>


bool isMonotonic(int* nums, int numsSize)
{
    int num[5];

    for (int i = 1; i < numsSize; i++)
    {
        num[i - 1] = nums[i] - nums[i - 1];
    }
    bool positive_number = true;
    bool negative_number = true;

    for (int i = 0; i < numsSize - 1; i++)
    {
        if (num[i] > 0)
        {
            negative_number = false;
            break;
        }
    }
    for (int i = 0; i < numsSize - 1; i++)
    {
        if (num[i] < 0)
        {
            positive_number = false;
            break;
        }
    }
    return (negative_number || positive_number);
}
int main()
{
    int numsSize = 5;

    int nums[5] = {1,2,3,4,5};

    isMonotonic(nums, numsSize);

    return 0;
}